package com.study.lxy.mutithread;

import org.junit.Test;

import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

public class CallableApp {

    /*
    @Test
    public void test1() throws Exception{

        Callable<Integer> callable = () -> {
            return 1;
        };
        callable.call();
    }

    @Test
    public void test2() throws Exception{
        FutureTask<String> futureTask = new FutureTask<>(() -> {
            return "hello world";
        });
        new Thread(futureTask).start();
        String result = futureTask.get();
        System.out.println(result);
    }
    */
}
